home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 36 / vfos_dv.zip / INT14.INC < prev    next >
Text File  |  1988-10-26  |  4KB  |  101 lines

  1.         subttl Interrupt 14H dispatcher
  2.         page +
  3.  
  4. ;
  5. ; VFOS_IBM VFOSSIL driver by Bob Hartman  (SysOp of 1:132/101).
  6. ; Copyright 1988 by Spark Software.  ALL RIGHTS RESERVED.
  7. ;* all comments beginning with * are added by David Page
  8. ;* and may not reflect Bob Hartman's intentions, or reality
  9. ;
  10.  
  11. vfos_entry proc far
  12.         push    cx                     
  13.         push    dx
  14.         push    si
  15.         push    di
  16.         push    ds
  17.         push    es
  18.  
  19.         push    cs                       ;* current code segment
  20.         pop     ds                       ;* in DS, setup for move
  21.                                          ;* of various data
  22.         cmp     al,0                     ;* is this subfunc 0, get VFOS_INFO?
  23.         jne     not_0                    ;* if not, go on
  24.  
  25. ; do subfunction 0
  26.         mov     si,offset vfos_info      ;* setup address of VFOS_INFO struc
  27.         mov     cx,8                     ;* 8 bytes long
  28.         repz    movsb                    ;* and copy the data to caller's table
  29.         mov     ah,3                     ;* read cursor position
  30.         mov     bh,0                     ;* for video page 0
  31.         int     10h
  32.         xor     ah,ah                    ;* zero ah
  33.         mov     al,ch                    ;* get starting scan line of cursor
  34.         mov     curs_info.curs_start,ax  ;* put it into table
  35.         mov     al,cl                    ;* get ending scan line of cursor
  36.         mov     curs_info.curs_end,ax    ;* put it into table
  37.         mov     ax,1954h                 ;* Fossil signature
  38.         jmp     done_14                  ;* jump out
  39.  
  40. not_0:
  41.         cmp     al,1                   ;* is it subfunc 1, get table of funcs?
  42.         jne     not_1                  ;* if not, go on
  43.         cmp     cx,FUNCNT*4            ;* did caller request a longer table 
  44.         jbe     cx_ok                  ;* than we have? If not, go on
  45.         mov     cx,FUNCNT*4            ;* else, only give them what we have
  46. cx_ok:
  47.         mov     si,offset FUNCTBL      ;* get address of FUNCTBL
  48.         repz    movsb                  ;* and move it to caller's table
  49.  
  50.         mov     ax,adapter_base        ;* Setup for DESQview shadow call
  51.         mov     es,ax                  ;* so that if video buffer is elsewhere
  52.         mov     ah,0feh                ;* DESQview will know, about this
  53.         int     10h                    ;* do invalid call (if DV not there)
  54.         mov     ax,es                  ;* return new (or old) adapter base
  55.         mov     adapter_base,ax        ;* to adapter_base
  56.  
  57.         mov     ax,1954h               ;* Fossil signature
  58.         mov     bh,FUNCNT              ;* put actual length of table in bh
  59.         jmp     done_14                ;* and return
  60.  
  61. not_1:
  62.         cmp     al,2                   ;* is this subfunction 2, close VFOSSIL?
  63.         jne     not_2                  ;* if not, go on
  64.         mov     ax,1954h               ;* Fossil signature
  65.         jmp     done_14                ;* return, having done nothing
  66.  
  67. not_2:
  68.         cmp     al,3                  ;* is this subfunction 3, remove VFOSSIL?
  69.                                       ;* (this seems to be an extension to the
  70.                                       ;*  VFOSSIL spec)
  71.         jne     not_3                 ;* if not, go on
  72.  
  73. ; remove ourselves from the FOSSIL chain
  74.         push    cs
  75.         pop     es
  76.         mov     ah,7fh                  ; deinstall application code
  77.         mov     al,81h                  ; VFOSSIL code
  78.         mov     dx,offset vfos_entry    ; offset of entry point (es ok)
  79.         int     14h                     ; initialize it
  80.  
  81. ; free PSP so we go away
  82.         mov     ah,49h
  83.         int     21h
  84.         mov     ax,1954h
  85.         jmp     done_14
  86.  
  87. not_3:
  88.         mov     ax,0ffffh
  89.         jmp     done_14
  90.  
  91. done_14:
  92.         pop     es
  93.         pop     ds
  94.         pop     di
  95.         pop     si
  96.         pop     dx
  97.         pop     cx
  98.  
  99.         ret
  100. vfos_entry endp
  101.